package com.qfedu.labsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qfedu.labsystem.dao.BookMapper;
import com.qfedu.labsystem.entity.bo.BookBO;
import com.qfedu.labsystem.entity.vo.BookVO;
import com.qfedu.labsystem.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName BookServiceImpl
 * @Author ykx
 * @Date 2024/4/7 16:34
 * @Version 1.0
 */
@Service
public class BookServiceImpl extends ServiceImpl<BookMapper, BookBO> implements BookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public Boolean addBook(BookBO bookBO) {
        return save(bookBO);
    }

    @Override
    public List<BookVO> getBookList(BookBO bookBO) {
        return bookMapper.getBookList(bookBO);
    }

    @Override
    public Boolean deleteBook(Integer id) {
        return removeById(id);
    }

    @Override
    public Boolean updateBook(BookBO bookBO) {
        return updateById(bookBO);
    }
}
